{validate form="reset" id="v_username_empty" append="error" message="Username cannot be empty."}
{validate form="reset" id="v_email_valid" append="error" message="Email is not valid."}
{if $send_button}
	<div class="failed">
		{assign var="session_name" value=#SessionName#}
		{if !$smarty.cookies.$session_name}
			Either your session has expired or you have to accept cookies from this site before using it.<br />
		{/if}
		{foreach $error as $message}
			{$message}<br />
		{foreachelse}
			{if $smarty.cookies.$session_name && $error@total == 0 && !$email_match}
				{assign var="custom_error" value="true"}
				The email address you supplied does not match the one listed for that username.<br />
			{/if}
			{if !$custom_error}
				An unknown session error occured. Do not refresh the page or submit the form, just click again on the link that brought you to this page to create a new session.<br />
			{/if}
		{/foreach}
	</div>
{/if}